package com.czk.webflux.reactor8;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/11/26 20:07
 */
public class TestReactor {
    public static void main(String[] args) {
        // 声明元素
        Flux.just(1,2,3,4).subscribe(System.out::println);
        Mono.just(1);
        // 数组
        Integer[] array={1,2,3,4};
        Flux.fromArray(array);
        List<Integer> list = Arrays.asList(array);
        Flux.fromIterable(list);
        // liu
        Stream<Integer> stream = list.stream();
        Flux.fromStream(stream);
    }
}
